package com.brush.pig.domain.req.Goods;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.brush.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
@Getter
@Setter
@ApiModel(value = "LotGoodsQueryReq",description = "物资查询参数")
@ToString(callSuper = true)
public class LotGoodsQueryReq extends PageAbstructReq {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 物资类型（数据字典）
     */
    @ApiModelProperty(value = "物资类型（数据字典）")
    private String type;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * 厂区ID
     */
    @ApiModelProperty(value = "厂区ID")
    private Long deptId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;



    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())){
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
